/* eslint valid-jsdoc: "off" */

"use strict";

/**
 * @param {Egg.EggAppInfo} appInfo app info
 */
module.exports = (appInfo) => {
  /**
   * built-in config
   * @type {Egg.EggAppConfig}
   **/
  const config = (exports = {});

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + "_1617330194860_8982";

  // add your middleware config here
  config.middleware = [];

  // add your user config here

  const userConfig = {
    // myAppName: 'egg',
    // mysql链接， 关闭安全验证
    mysql: {
      // 单数据库信息配置
      client: {
        // host
        host: "106.14.154.106",
        // 端口号
        port: "3306",
        // 用户名
        user: "spiritboy",
        // 密码
        password: "5nYaddXChc38AJSM",
        // 数据库名
        database: "spiritboy",
      },
      // 是否加载到 app 上，默认开启
      app: true,
      // 是否加载到 agent 上，默认关闭
      agent: false,
    },
    security: {
      csrf: {
        enable: false,
      },
    },
  };

  return {
    ...config,
    ...userConfig,
  };
};
